//
//  XiTongRenWuTableViewCell.m
//  firstpoint
//
//  Created by 泽中 on 2017/6/30.
//  Copyright © 2017年 xzcysoft. All rights reserved.
//

#import "XiTongRenWuTableViewCell.h"

@implementation XiTongRenWuTableViewCell
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self)
    {
        _imgView=[[UIImageView alloc]initWithFrame:CGRectMake(6, 12.5 , 75, 75)];
        _imgView.backgroundColor=[UIColor purpleColor];
        _imgView.image=[UIImage imageNamed:@"timg.jpeg"];
        [self.contentView addSubview:_imgView];
        
        _titleLab=[[UILabel alloc]initWithFrame:CGRectMake(93, 14, width_screen-93-20, 17)];
        _titleLab.textColor=LRRGBColor(68, 68, 68);
        _titleLab.font=[UIFont systemFontOfSize:17];
        _titleLab.text=@"星期三我张开双臂";
        [self.contentView addSubview:_titleLab];
        
        _meiriLab=[[UILabel alloc]initWithFrame:CGRectMake(93, 14+17+14, 66, 13)];
        _meiriLab.text=@"每日任务";
        _meiriLab.textColor=LRRGBColor(164, 164, 164);
        _meiriLab.font=[UIFont systemFontOfSize:13];
        [self.contentView addSubview:_meiriLab];
        _jindouLab=[[UILabel alloc]initWithFrame:CGRectMake(93+66, 14+17+12, 150, 17)];
        _jindouLab.text=@"+ 100成长值";
        _jindouLab.font=[UIFont systemFontOfSize:17];
        _jindouLab.textColor=[UIColor orangeColor];
        [self.contentView addSubview:_jindouLab];
        
        _chengzhangLab=[[UILabel alloc]initWithFrame:CGRectMake(93, 75, 150, 13)];
        _chengzhangLab.text=@"高成长值 每日必做";
        _chengzhangLab.textColor=LRRGBColor(164, 164, 164);
        _chengzhangLab.font=[UIFont systemFontOfSize:13];
        [self.contentView addSubview:_chengzhangLab];
        
        _button=[UIButton buttonWithType:UIButtonTypeCustom];
        _button.frame=CGRectMake(width_screen-120, 65, 110, 25);
        _button.backgroundColor=[UIColor whiteColor];
        _button.layer.cornerRadius=3;
        _button.layer.borderColor=LRRGBColor(22, 141, 210).CGColor;
        [_button setTitle:@"今日签到" forState:0];
        _button.layer.borderWidth=1;
        _button.titleLabel.font=[UIFont systemFontOfSize:13];
        [_button setTitleColor:LRRGBColor(22, 141, 210) forState:0];
        [self.contentView addSubview:_button];
    }
    return self;
}
#pragma mark - 绘制Cell分割线
- (void)drawRect:(CGRect)rect {
    
    CGContextRef context = UIGraphicsGetCurrentContext();
    CGContextSetFillColorWithColor(context, [UIColor clearColor].CGColor);
    CGContextFillRect(context, rect);
    
    
    //下分割线
    CGContextSetStrokeColorWithColor(context, [UIColor colorWithRed:198/255.0 green:198/255.0 blue:198/255.0 alpha:1].CGColor);
    CGContextStrokeRect(context, CGRectMake(0, rect.size.height, rect.size.width, 0));
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
